<%@ page language="java" import="base.util.ShiroUtils,base.properties.FramePropertyPlaceholderConfigurer" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/trunk/js/header.jsp"%>
<%
	//当前用户IP
	String ip = ShiroUtils.getIp(request);
	//当前用户真实姓名
	String fullname = ShiroUtils.getFullname();
	//版权所有
	String copyright = FramePropertyPlaceholderConfigurer.getProperty("copyright");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>Web框架-Maven&SpringMvc&SpringDataJpa&miniui</title>
<script src="${ctx}/trunk/js/boot.js" type="text/javascript"></script>
<script src="${ctx}/trunk/js/frameComponent/frame-top1.js" type="text/javascript"></script>
<link rel="stylesheet" href="${ctx}/trunk/css/frame/style1/frame-top/frame-top.css">
</head>
<body>
	<div class="frame">
		<!-- 顶部 -->
		<div class="frame-top">
			<!-- 顶部左边部分 -->
			<div class="frame-top-left">
				<!-- LOGO -->
					<img id="projectLogo" class="frame-top-logo-img">
				<div class="frame-top-logo" id="projectName">
					开发Web框架示例系统
				</div>
			</div>
			<!-- 顶部右边部分 -->
			<div class="frame-top-right">
				<!-- 顶部菜单 -->
				<div class="frame-top-menu">
					<ul id="menu" class="frame-menu"></ul>
				</div>
				<!-- 当前用户 -->
				<div class="frame-top-userinfo" title="当前登录用户：<%=fullname%>">
						<div class="frame-top-userinfo-img"></div>
						<%=fullname%>
				</div>
				<!-- 全屏按钮 -->
				<div  id="fullScreen_open" class="frame-top-fullscreen" onclick="FullScreen.open()">
					<div class="frame-top-fullscreen-open-img" title="全屏" ></div>
					全屏
				</div>
				<div  id="fullScreen_closed" class="frame-top-fullscreen" style="display: none;" onclick="FullScreen.closed()">
					<div class="frame-top-fullscreen-closed-img"  title="退出全屏" ></div>
					退出全屏
				</div>	
				<!-- 退出登录 -->
				<div class="frame-top-loginout" onclick="location.href='${ctx}/loginOut.do?ip=<%=ip %>'">
						<div class="frame-top-loginout-img"></div>
						<span>退出</span>
				</div>
			</div>
		</div>
		<!-- 中间主区域 -->
		<div class="frame-center">
			<!-- tab页签 -->
			<div id="main-tab" class="mini-tabs" contextMenu="#tabsMenu" activeIndex="0" style="width: 100%; height: 100%;" arrowPosition="side" showCloseButton="true"
				showNavMenu="true">
			</div>
			<!-- 页签上的右键菜单 -->
			<ul id="tabsMenu" class="mini-contextmenu"  onbeforeopen="FrameTab.onBeforeOpen">
				<li onclick="FrameTab.closeTab">关闭当前标签页</li>
				<li onclick="FrameTab.closeAllBut">关闭其他标签页</li>
				<li onclick="FrameTab.closeAll">关闭所有标签页</li>
			</ul>
		</div>
		<!--底部-->
		<div class="frame-bottom">
			版权所有 &copy; <%=copyright%>
		</div>
	</div>
	<script type="text/javascript">
		mini.parse();
		/**页面初始化**/
		initial();
		function initial(){
			//生成菜单(传参：菜单控件ID；IP；菜单图标的路径，以“/”结尾。不同的分支如果框架页不同，菜单图标的路径也不同)
			FrameMenu.initial("menu","<%=ip%>",ctx+"/trunk/img/frame/style1/frame-top/menu/");
			//设置系统时间(传参：时间控件ID)
			//FrameTime.initial("datetime_");
			//初始化Tab(传参：mini-tab的ID)
			FrameTab.initial("main-tab");
			//加载首页。首页名称及地址以此方法设置的为准。如果系统资源中配置了首页，则点击首页菜单时，共用此处首页（如果菜单地址不一致，以此处为准）。
			FrameTab.showHomePage("首页",ctx+"/trunk/page/main/main.jsp");//首页Tab标签名称，首页Url地址
			//加载系统名称
			var projectName=getProjectName();
			if(projectName[0]!=""){
				$("#projectName").html(projectName[0]);
			}
			if(projectName[1]!=""){
				$("#projectLogo").attr("src",getProperties("authorServerUrl")+"/api/showProjectLogo.do?url="+projectName[1]);
			}
		}
	</script>
</body>
</html>
